<?php
    try{
        $conn = new PDO("mysql:host=mysql:3306;dbname=auth", "root", "lwx123");
        echo "连接成功"."</br>";
        $stmt = $conn->prepare("SELECT * FROM users");
        $stmt->execute();
        $stmt->setFetchMode(PDO::FETCH_ASSOC);
        foreach ($stmt->fetchAll() as $key => $value) {
            echo $value['user_name'] .'----'. MD5($value['user_password'])."</br>";
        }
    }catch(PDOException $e){
        echo $e->getMessage();
    }
?>